package com.ruoyi.query.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.query.entity.TableQueryColumn;

import java.util.List;

/**
 * <p>
 * 列表查询列 服务类
 * </p>
 *
 * @author XiaShiLong
 * @since 2021-03-25
 */
public interface TableQueryColumnService extends IService<TableQueryColumn> {

    /**
     * 根据menuId获取
     *
     * @param menuId 菜单id
     * @return Optional
     */
    List<TableQueryColumn> get(Long menuId);

    /**
     * 获取所有可查询字段
     *
     * @param menuId    菜单id
     * @param classPath 类路径
     * @return List
     */
    List<TableQueryColumn> getAll(Long menuId, String classPath) throws ClassNotFoundException;

    /**
     * 保存可查询列
     *
     * @param menuId               菜单id
     * @param classPath            类路径
     * @param tableQueryColumnList <see>TableQueryColumn</see>
     * @return boolean
     */
    boolean saveAll(Long menuId, String classPath, List<TableQueryColumn> tableQueryColumnList) throws ClassNotFoundException;
}
